<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
    <title>审核授课班</title>
    <!--<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/Student_Manager/Public/img/favicon.ico">
loading css
<link rel="stylesheet" href="/Student_Manager/Public/vendor/loading/loading.css" />
<link href="/Student_Manager/Public/css/bootstrap.min.css" rel="stylesheet">
<link href="/Student_Manager/Public/css/font-awesome.min.css" rel="stylesheet">
<link href="/Student_Manager/Public/css/animate.css" rel="stylesheet">
<link href="/Student_Manager/Public/css/style.css" rel="stylesheet">
<link href="/Student_Manager/Public/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/Student_Manager/Public/vendor/SweetAlert2/sweetalert2.min.css" />
<link href="/Student_Manager/Public/vendor/toastr/toastr.min.css" rel="stylesheet">
<link href="/Student_Manager/Public/vendor/select2/select2.css" rel="stylesheet">
<link href="/Student_Manager/Public/vendor/fileinput/fileinput.min.css" rel="stylesheet">-->


<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/Student_Manager/Public/img/favicon.ico">
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="shortcut icon" href="favicon.ico">
<link href="/Student_Manager/Public/css/bootstrap.min.css" rel="stylesheet">
<link href="/Student_Manager/Public/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="/Student_Manager/Public/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="/Student_Manager/Public/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="/Student_Manager/Public/css/animate.css" rel="stylesheet">
<link href="/Student_Manager/Public/css/style.css?v=4.1.0" rel="stylesheet">
<link href="/Student_Manager/Public/vendor/fileinput/fileinput.min.css" rel="stylesheet">
<link href="/Student_Manager/Public/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/Student_Manager/Public/vendor/SweetAlert2/sweetalert2.min.css" />
<link rel="stylesheet" href="/Student_Manager/Public/vendor/loading/loading.css" />
<link href="/Student_Manager/Public/vendor/toastr/toastr.min.css" rel="stylesheet">
<style type="text/css">
	/* dataTables列内容居中 */
    .file-footer-buttons .kv-file-upload {
        display: none;
    }

    .file-footer-buttons .kv-file-zoom {
        display: none;
    }
    .file-footer-buttons .kv-file-remove {
        display: none;
    }
	.table>tbody>tr>td {
		text-align: center;
	}
	/* dataTables表头居中 */
	.table>thead:first-child>tr:first-child>th {
		text-align: center;
	}
	.ibox-title {
		height: 46px;
	}
    #addBtn {
        float: right;
        margin: -7px -6px 9px;
    }

    .price-div {
        /*float: left;*/
        margin: 12px 0px 6px 16px;
    }
    /*.price-div label {
        padding-right: 6px;
        padding-left: 6px;
    }*/
    .price-div input {
        width: 60%;
        float: left;
        max-width: 16em;
        margin-right: 6px;
    }

    .price-div p {
        line-height: 25px;
        margin-right: 6px;
        float: left;
    }

    .price-div select {
        /*float: left;*/
        width: 60%;
        max-width: 16em;
        margin-right: 10px;

    }

    .cyf-form-group {
        margin-top: 10px;
        margin-bottom: 10px;

    }

    /*.cyf-label {*/
        /*padding: 3px 0 0 0;*/
    /*}*/
    .cyf-input{
        width: 280px;
    }
    .staff {
        margin-top: 6px;
    }

    .nationality {
        margin-right: 15px;
    }

    div.dataTables_wrapper div.dataTables_filter label input {
        margin-left: 0.5em;
        display: inline-block;
        width: 73%;
    }
    .dataTables_wrapper {
        position: relative;
        clear: both;
        zoom: 1;
        overflow-x: auto;
    }
    .removeSelect{
        width: 300px;
    }
    .poiu{
        width: 300px;
    }

</style>

    <style type="text/css">
        #addBtn {
            float: right;
            margin: -7px 6px 9px;
        }
        #setingBtn {
            float: right;
            margin: -7px 6px 9px;
        }
        .setting-col{
            margin: 5px 0 0 5px;
        }

    </style>
</head>
<body>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>审核授课班</h5>
                    <!--<button class="btn btn-info" id="addBtn">添加授课班</button>-->
                </div>
                <div class="row s-row">
                    <div class="col-sm-12">
                        <div class="price-div">
                            <form class="form-horizontal">
                                <div class="form-group cyf-form-group">
                                    <div class="col-sm-4" style="margin-top: 10px; margin-bottom: 10px">
                                        <label style="float: left; margin-right: 13px;" class="col-sm-4 control-label cvbnm">课程: </label>
                                        <select class="form-control col-sm-" id="course_id" name="course_id" style="min-height: 35px">
                                            <option value="0">全部</option>
                                            <?php if(is_array($course_info)): $i = 0; $__LIST__ = $course_info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>"><?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                        </select>
                                    </div>
                                    <div class="col-sm-4" style="margin-top: 10px; margin-bottom: 10px">
                                        <label style="float: left" class="col-sm-4 control-label cvbnm">教学方案: </label>
                                        <select class="form-control col-sm-" id="teach_method_id" name="teach_method_id" style="min-height: 35px">
                                            <option value="0">全部</option>
                                            <?php if(is_array($teachingmethod_info)): $i = 0; $__LIST__ = $teachingmethod_info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>" pid="<?php echo ($vo["cou_id"]); ?>" style="display: none"><?php echo ($vo["me_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group cyf-form-group">
                                    <div class="col-sm-1" style="margin-top: 10px; margin-bottom: 10px; float: left">
                                        <a id="checkStuBtn" href="javascript:void(0);" class="btn btn-info">审核通过</a>
                                    </div>

                                    <div class="col-sm-1" style="margin-top: 10px; margin-bottom: 10px; float: left">
                                        <!--<button class="btn btn-success" id="addClassBtn">添加教学班</button>-->
                                        <a id="addClassBtn" href="javascript:void(0);" class="btn btn-danger">审核不通过</a>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="table table-striped table-bordered table-hover dataTables-example" id="RuleTable">
                        <thead>
                        <tr>
                            <th width="4%"> <input type="checkbox" id="checkall"></th>
                            <th width="8%">授课班编号</th>
                            <th width="20%">授课班名称</th>
                            <th width="10%">教学方案</th>
                            <th width="10%">起始时间</th>
                            <th width="10%">结束时间</th>
                            <th width="10%">状态</th>
                            <th width="8%">人数</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 全局js -->
<!--<script src="/Student_Manager/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/Student_Manager/Public/js/bootstrap.min.js?v=3.3.6"></script>
<script type="text/javascript" src="/Student_Manager/Public/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/js/plugins/layer/layer.min.js"></script>-->

 <!--Data Tables -->
<!--<script type="text/javascript" src="/Student_Manager/Public/js/plugins/dataTables/jquery.dataTables.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/vendor/SweetAlert2/sweetalert2.min.js"></script>-->

<!--toastr-->
<!--<script type="text/javascript" src="/Student_Manager/Public/vendor/toastr/toastr.min.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/vendor/select2/select2.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/vendor/fileinput/fileinput.min.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/vendor/fileinput/locales/zh.js"></script>-->

<!--loading-->
<!--<script src="/Student_Manager/Public/vendor/loading/loading.js"></script>-->




<!-- 全局js -->
<script src="/Student_Manager/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/Student_Manager/Public/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/Student_Manager/Public/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/Student_Manager/Public/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/Student_Manager/Public/js/plugins/layer/layer.min.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/vendor/SweetAlert2/sweetalert2.min.js"></script>
<!-- 自定义js -->
<script src="/Student_Manager/Public/js/hAdmin.js?v=4.1.0"></script>
<script type=text/javascript" src=""/Student_Manager/Public/js/index.js"></script>

<!-- 第三方插件 -->
<script src="/Student_Manager/Public/js/plugins/pace/pace.min.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/vendor/fileinput/fileinput.min.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/vendor/fileinput/locales/zh.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/js/plugins/dataTables/jquery.dataTables.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="/Student_Manager/Public/vendor/toastr/toastr.min.js"></script>

<!--loading-->
<script src="/Student_Manager/Public/vendor/loading/loading.js"></script>

<script type="text/javascript">
    function check_index() {
        if(!document.referrer){

            window.location.href = '/Student_Manager/index.php/Test/Main/index';
        }
    }

    toastr.options = {
		"closeButton": true,
		"positionClass": "toast-top-right",
		"onclick": null,
		"showDuration": "300",
		"hideDuration": "1000",
		"timeOut": "5000",
		"extendedTimeOut": "1000",
		"showEasing": "swing",
		"hideEasing": "linear",
		"showMethod": "fadeIn",
		"hideMethod": "fadeOut"
	}

	function sil_loading() {
		$('body').loading({
			loadingWidth: 240,
			title: '请稍等!',
			name: 'test',
			discription: '正在加载...',
			direction: 'column',
			type: 'origin',
			// originBg:'#71EA71',
			originDivWidth: 40,
			originDivHeight: 40,
			originWidth: 6,
			originHeight: 6,
			smallLoading: false,
			loadingMaskBg: 'rgba(0,0,0,0.2)'
		});
	}

	function sil_reloading() {
		removeLoading('test');
	}
    // 通过text 设置select2的默认值
    function select2ByText (obj, text) {
        var select2Obj = $('#'+obj).select2();
        $(obj).select("option").each(function(data){
            if (text == data.text.strip()) {
                select2Obj.val(data.value).trigger("change");
            }
        });
    }
    function selectByText(obj,text) {
        var selectObj = $('#'+obj);
        $(selectObj).find("option").each(function(data){
            var $this = $(this);
            if (text == $this.text()) {
                selectObj.val($this.val());
            }
        });
    }
    //销毁模态框
    $(".modal").on("hidden.bs.modal", function() {
        $('.removeData').val('');
        $('.removeSelect').val("0").trigger("change");
        $('.poiu').val("0").trigger("change");
        $(".wrapper").addClass('animated');
    });


</script>
<script src="/Student_Manager/Public/js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        check_index();
        //datatable
        sTable = $("#RuleTable").DataTable({
            "fnServerParams": function (aoData) {
                aoData.push({
                    'name': 'tme_id',
                    'value': $('select#teach_method_id option:selected').val(),
                });
            },
            "order": [[0, "asc"]],
            //              "aaSorting": [
            //                  [0, "asc"]
            //              ],
            "bAutoWidth": false,
            "oLanguage": {
                "sLengthMenu": "每页 _MENU_ ",
                "sProcessing": "处理中...",
                "sZeroRecords": "没有匹配结果",
                "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                "sInfoEmpty": "显示第 0 至 0 项结果，共 0 项",
                "sInfoFiltered": "(由 _MAX_ 项结果过滤)",
                "sInfoPostFix": "",
                "sSearch": "搜索:",
                "sUrl": "",
                "sEmptyTable": "表中数据为空",
                "sLoadingRecords": "载入中...",
                "sInfoThousands": ",",
                "oPaginate": {
                    "sFirst": "首页",
                    "sPrevious": "上页",
                    "sNext": "下页",
                    "sLast": "末页"
                },
                "oAria": {
                    "sSortAscending": ": 以升序排列此列",
                    "sSortDescending": ": 以降序排列此列"
                }
            },
            "sAjaxSource": "/Student_Manager/index.php/Home/Class/check_teaching_class_ShowDatatables", //调用php后台接口方法地址
            "aoColumns": [{
                "data": null,
                orderable: false,
                render: function(data, type, row, meta){
                    // var dat = {"stu_id":data.stu_id,"tc_id":data.tc_id};
                    var dat = data.stu_id + ',' + data.tc_id;
                    return '<input type="checkbox" name="checkBox" class="checkchild" value=" ' + dat +  '" > ';
                }
            },{
                'data'  : 'tc_id'
            },{
                'data'  : 'tc_name'
            },{
                'data': 'me_name'
            },{
                'data': 'tc_strdate'
            },{
                'data': 'tc_enddate'
            },{
                'data': 'tc_status'
            },{
                'data': 'tc_stunum'
            }]
        });
    });
    //查询
    $('select#course_id').change(function () {
        var p_id = $("#course_id").val();
        $("#teach_method_id option").hide();
        $('#teach_method_id').val('0');
        $('#teach_method_id option[pid=' + p_id + ']').show();
    });
    $("select#teach_method_id").change(function(){
        sTable.ajax.reload();
    });

  


    $('#checkall').on('click',function(){
        var check = $(this).prop("checked");
        // $('.checkchild').prop('checked',check);
        sTable.$('.checkchild').prop('checked',check);
    });
    $("select#teaching_class_id").change(function(){
        //console.log($('select#class_id option:selected').val())
        sTable.ajax.reload();
    });











    function SetDateIntervalFromID(obj){
        $('.wrapper').removeClass('animated');
        $('#SettingeModal').modal();
    }
</script>
</body>
</html>